<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= I18n.locale %>" lang="<%= I18n.locale %>">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta name="keywords" content="fanfiction, transformative works, otw, fair use, archive" />
  <meta name="language" content="en-US" />
  <meta name="subject" content="fandom" />
  <meta name="description" content="An Archive of Our Own, a project of the
  Organization for Transformative Works" />
  <meta name="distribution" content="GLOBAL" />
  <meta name="classification" content="transformative works" />
  <meta name="author" content="Organization for Transformative Works" />
  <% if @user && @user.try(:preference).try(:minimize_search_engines?) %>
    <meta name="robots" content="noindex" />
    <meta name="googlebot" content="noindex" />
  <% end %>
  <title>
    <% if defined?(@page_title) %>
      <%= @page_title %>
    <% else %>
      <%=h ArchiveConfig.APP_NAME  %>
      &raquo;
      <%= controller.controller_name %>
      <%= controller.action_name %>
      <% if defined?(@page_subtitle) %>
        &raquo;
        <%= @page_subtitle %>
      <% end %>
    <% end %>
  </title>

  <%= render :partial => 'layouts/includes' %>

  </head>

  <body onload="hideLogin();">
  <ul id="skiplinks"><li><a href="#main"><%=h ts('Main Content') %></a></li></ul>
  <%= render :partial => 'layouts/header' %>

    <!-- BEGIN sidebar -->
    <% if @admin_posts %>
      <%= render :partial => 'admin_posts/sidebar' %>
    <% elsif @user && !@hide_dashboard %>
      <%= render :partial => 'users/sidebar' %>
    <% elsif @collection && !@hide_dashboard %>
      <%= render :partial => 'collections/sidebar' %>
    <% elsif show_wrangling_dashboard %>
      <%= render :partial => 'tag_wranglings/wrangler_dashboard' %>
    <% end %>
    <!-- END sidebar -->

    <!-- BEGIN main -->
    <div id="main" class="<%= classes_for_main %>" role="main">
      <%= flash_div :error, :warning, :notice %>
      <%= yield  %>
    <div class="clear"><!--presentational--></div>
  </div>
    <!-- END main -->

    <%= render :partial => 'layouts/footer' %>

  </body>
</html>
